# -*- coding: utf-8 -*-

class RobotNotConnectedError(Exception):
    """机器人未连接时抛出的异常"""
    def __init__(self, message="Robot is not connected. Please call connect() first"):
        super().__init__(message)
        # 可以扩展更多错误信息字段
        self.error_code = 0x1001
        self.category = "Connection Error"

class MotionPlanningError(Exception):
    """运动规划失败时抛出的异常"""
    def __init__(self, message="Motion planning failed"):
        super().__init__(message)
        # 可以扩展更多错误信息字段
        self.error_code = 0x2001
        self.category = "Motion Error"

class RobotError(Exception):
    """所有机器人异常的基类"""
    def __init__(self, message, error_code, category):
        super().__init__(message)
        self.error_code = error_code
        self.category = category